{% extends 'base.html' %}
{% block body %}
<div class="row">
    <div class="span10">
        <div>
            <h1>Position</h1>
            <form action="/Organization/posCreate/" method="post">
                <input type="text" name="L_posCreate" placeholder="positions-create">
                <button type=submit>create</button>
            </form>
            <form action="/Organization/posQuery/" method="post">
                <input type="text" name="L_posQuery" placeholder="positios-query">
                <button type="submit">query</button>
            </form>
            {% for p in L_posList %}
                <ul>
                    <li>{{ p.posName }}
                        <form action="/Organization/posUpdate/{{ p.id }}/" method="post">
                            <input type="text" name="L_posUpdate" placeholder="position-update"><br/>
                            <button type="button" onclick="delPos({{ p.id }})">delete</button>
                            <button type="submit">update</button>
                        </form>
                    </li>
                </ul>
            {% endfor %}
        </div>
    </div>
</div>
{% endblock %}
{% block fun %}
        function delPos(number){
            b = confirm('delete Position?');
            if (b){
                location.href="http://localhost:8000/Organization/posRemove/"+number;
            }
        }
{% endblock %}
